CONST SeparatorTop = SeparatorFlagSet{lnsTop}; (* maybe you should use these *)
SeparatorMiddle = SeparatorFlagSet{lnsMiddle}; (* instead of the flags above *)
SeparatorBottom = SeparatorFlagSet{lnsBottom};
TYPE LineColor = RECORD
xPos,color : CARDINAL;
END;
TYPE LineStyleFlags = (bold,underline,italic,sf3,sf4,sf5,sf6,sf7,sf8,sf9,sf10,sf11,sf12,sf13,sf14,sf15);
LineStyleFlagSet = SET OF LineStyleFlags;
LineStyle = RECORD
xPos : CARDINAL;
style : LineStyleFlagSet;
END;
TYPE LineNode = RECORD
contents : ADDRESS; (* actually StringPtr, set this to the linecontents (allocated via the poolhandle) *)
length : LONGCARD; (* The length of the line (including the '\n') *)
styles : POINTER TO ARRAY [0..511] OF LineStyle; (* Set this to the styles used for this line (allocated via the poolhandle) *)
colors : POINTER TO ARRAY [0..511] OF LineColor;
colorPad : BYTE;
color : BOOLEAN; (* Set this to TRUE if you want the line to be highlighted *)
flow : CARDINAL; (* Use the mvTextEditorFlow#? values... *)
separator : SeparatorFlagSet;
END;
LineNodePtr = POINTER TO LineNode;
TYPE ExportMessage = RECORD
userData : ADDRESS; (* This is set to what your hook returns (NULL the first time) *)
contents : ADDRESS; (* actually StringPtr, pointer to the current line *)
length : LONGCARD; (* Length of Contents, including the '\n' character *)
styles : POINTER TO ARRAY [0..511] OF LineStyle;
colors : POINTER TO ARRAY [0..511] OF LineColor;
highlightPad : BYTE;
highlight : BOOLEAN;
flow : CARDINAL; (* Current lines flow *)
separator : SeparatorFlagSet; (* Se definitions above *)
exportWrap : LONGCARD; (* For your use only (reflects maTextEditorExportWrap) *)
lastPad : BYTE;
last : BOOLEAN; (* Set to TRUE if this is the last line *)
data : ADDRESS; (* Private! *)
END;
ExportMessagePtr = POINTER TO ExportMessage;
TYPE ImportMessage = RECORD
data : ADDRESS; (* actually StringPtr, the first time the hook is called, then this will be either the value of maTextEditorContents, or the argument given to mmTextEditorInsert. *)
lineNode : LineNodePtr; (* Pointer to a linenode, which you should fill out *)
poolHandle : ADDRESS; (* A poolhandle, all allocations done for styles or contents must be made from this pool, and the size of the allocation must be stored in the first LONG *)
importWrap : LONGCARD; (* For your use only (reflects maTextEditorImportWrap) *)